import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect:'/user',
    children:[
      {
        path: '/user', component: () => import(/* webpackChunkName: "about" */ '../views/user/UserView.vue')
      },
      {
        path: '/menu', component: () => import(/* webpackChunkName: "about" */ '../views/menu/MenuView.vue')
      },
      {
        path: '/role', component: () => import(/* webpackChunkName: "about" */ '../views/role/RoleView.vue')
      },
      {
        path: '/department', component: () => import(/* webpackChunkName: "about" */ '../views/department/DepartmentView.vue')
      }
    ]
  },
  {path: '/login', component: () => import('../views/LoginView.vue')},
  {path: '/Caculate', component: () => import('../views/fontweb/CaculateView.vue')},
  {path: '/phone', component: () => import('../views/fontweb/PhoneView.vue')},

]


const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router